package com.enums;


public enum KeyboardKey {
    KEY_SPACE(32, ' '),
    KEY_EXCLAMATION_MARK(33, '!'),
    KEY_DOUBLE_QUOTE(34, '\"'),
    KEY_HASH(35, '#'),
    KEY_DOLLAR(36, '$'),
    KEY_PERCENT(37, '%'),
    KEY_AMPERSAND(38, '&'),
    KEY_SINGLE_QUOTE(39, '\''),
    KEY_LEFT_PARENTHESIS(40, '('),
    KEY_RIGHT_PARENTHESIS(41, ')'),
    KEY_ASTERISK(42, '*'),
    KEY_PLUS(43, '+'),
    KEY_COMMA(44, ','),
    KEY_MINUS(45, '-'),
    KEY_PERIOD(46, '.'),
    KEY_SLASH(47, '/'),
    KEY_0(48, '0'),
    KEY_1(49, '1'),
    KEY_2(50, '2'),
    KEY_3(51, '3'),
    KEY_4(52, '4'),
    KEY_5(53, '5'),
    KEY_6(54, '6'),
    KEY_7(55, '7'),
    KEY_8(56, '8'),
    KEY_9(57, '9'),
    KEY_COLON(58, ':'),
    KEY_SEMICOLON(59, ';'),
    KEY_LESS_THAN(60, '<'),
    KEY_EQUALS(61, '='),
    KEY_GREATER_THAN(62, '>'),
    KEY_QUESTION_MARK(63, '?'),
    KEY_AT_SYMBOL(64, '@'),
    KEY_A(65, 'A'),
    KEY_B(66, 'B'),
    KEY_C(67, 'C'),
    KEY_D(68, 'D'),
    KEY_E(69, 'E'),
    KEY_F(70, 'F'),
    KEY_G(71, 'G'),
    KEY_H(72, 'H'),
    KEY_I(73, 'I'),
    KEY_J(74, 'J'),
    KEY_K(75, 'K'),
    KEY_L(76, 'L'),
    KEY_M(77, 'M'),
    KEY_N(78, 'N'),
    KEY_O(79, 'O'),
    KEY_P(80, 'P'),
    KEY_Q(81, 'Q'),
    KEY_R(82, 'R'),
    KEY_S(83, 'S'),
    KEY_T(84, 'T'),
    KEY_U(85, 'U'),
    KEY_V(86, 'V'),
    KEY_W(87, 'W'),
    KEY_X(88, 'X'),
    KEY_Y(89, 'Y'),
    KEY_Z(90, 'Z'),
    KEY_LEFT_SQUARE_BRACKET(91, '['),
    KEY_BACKSLASH(92, '\\'),
    KEY_RIGHT_SQUARE_BRACKET(93, ']'),
    KEY_CARET(94, '^'),
    KEY_UNDERSCORE(95, '_'),
    KEY_GRAVE_ACCENT(96, '`'),
    KEY_a(97, 'a'),
    KEY_b(98, 'b'),
    KEY_c(99, 'c'),
    KEY_d(100, 'd'),
    KEY_e(101, 'e'),
    KEY_f(102, 'f'),
    KEY_g(103, 'g'),
    KEY_h(104, 'h'),
    KEY_i(105, 'i'),
    KEY_j(106, 'j'),
    KEY_k(107, 'k'),
    KEY_l(108, 'l'),
    KEY_m(109, 'm'),
    KEY_n(110, 'n'),
    KEY_o(111, 'o'),
    KEY_p(112, 'p'),
    KEY_q(113, 'q'),
    KEY_r(114, 'r'),
    KEY_s(115, 's'),
    KEY_t(116, 't'),
    KEY_u(117, 'u'),
    KEY_v(118, 'v'),
    KEY_w(119, 'w'),
    KEY_x(120, 'x'),
    KEY_y(121, 'y'),
    KEY_z(122, 'z'),
    KEY_LEFT_CURLY_BRACKET(123, '{'),
    KEY_VERTICAL_BAR(124, '|'),
    KEY_RIGHT_CURLY_BRACKET(125, '}'),
    KEY_TILDE(126, '~'),
    // 省略其他键的定义以便集中展示新增内容
    KEY_BACKSPACE(8, '\b'), // '\b' 是退格键的转义字符
    KEY_CTRL(17, '\b'), // '\b' 是退格键的转义字符
    ;

    private final int asciiCode;
    private final char keyChar;

    KeyboardKey(int asciiCode, char keyChar) {
        this.asciiCode = asciiCode;
        this.keyChar = keyChar;
    }

    public int getAsciiCode() {
        return asciiCode;
    }

    public char getKeyChar() {
        return keyChar;
    }
}

